import {
    SearchAxios
} from "@/api"

const actions = {
    async getSearchList(miniStore,value){
        const re= await SearchAxios(value);
        if (re.code === 200) {
            miniStore.commit("SET_SEARCHLIST_DATA", re.data)
        }
    }
};
const mutations = {
    SET_SEARCHLIST_DATA(state,value){
        state.SearchList=value
    }
};
const state = {
    SearchList:{}
};
const getters={
    goodsList(state){
        return state.SearchList.goodsList
    },
    attrsList(state){
        return state.SearchList.attrsList
    },
    trademarkList(state){
        return state.SearchList.trademarkList
    },
    total(state){
        return state.SearchList.total
    }
}


export default {
    actions,
    mutations,
    state,
    getters
}